//
//  CalendarCollectionViewEditableLayout.h
//  OfficeBook
//
//  Created by 孙晓奇 on 15/10/10.
//  Copyright © 2015年 sunny. All rights reserved.
//

#import "CalendarCollectionViewLayout.h"

typedef NS_ENUM(NSInteger, ScrollDirction) {
    ScrollDirctionNone,
    ScrollDirctionLeft,
    ScrollDirctionRight
};

@class CalendarEventCell;
@protocol CalendarCollectionViewEditableLayoutDelegate <MSCollectionViewCalendarLayoutDelegate>

@required
- (void)collectionView:(UICollectionView *)collectionView createItemAtLocation:(CGPoint)location;

- (void)collectionView:(UICollectionView *)collectionView didEndDragCell:(CalendarEventCell *)cell;
- (void)collectionView:(UICollectionView *)collectionView didEndLongPressCell:(CalendarEventCell *)cell;

-(void)collectionView:(UICollectionView *)collectionView shouldShowDetailForItemAtIndexPath:(NSIndexPath *)indexPath;

@optional
- (void)collectionView:(UICollectionView *)collectionView beginLongPressSelectItemAtIndexPath:(NSIndexPath *)indexPath;
@end

@interface CalendarCollectionViewEditableLayout : CalendarCollectionViewLayout
@property (nonatomic, weak) id<CalendarCollectionViewEditableLayoutDelegate> delegate;

@property (nonatomic, strong, readonly) UILongPressGestureRecognizer *longPressGesture;
@property (nonatomic, strong, readonly) UIPanGestureRecognizer *panGesture;

@property (nonatomic, strong) CalendarEventCell     *currentCell;

@property (nonatomic, assign) CGPoint newCellLocation;  //长按新cell位置

- (void)addFakeCell:(CalendarEventCell *)currentCell;
- (void)removeFakeCell;
- (void)adjustFakeCell:(CalendarEventCell *)currentCell;
@end
